草庐IT

Android Explicit Intent 抛出 NoClassDefFounderror

全部标签

android - FingerprintManager.isHardwareDetected() 抛出 java.lang.SecurityException?

我有一个应用程序可以使用指纹进行身份验证。在询问用户是否要启用它之前,我会验证它是否可用并通过以下方式完成:FingerprintManagerfingerprintManager=context.getSystemService(FingerprintManager.class);returnfingerprintManager.isHardwareDetected()&&fingerprintManager.hasEnrolledFingerprints();FingerprintManager的两个方法都带有注释:@RequiresPermission(USE_FINGERPRI

android - 错误 "java.lang.NoClassDefFoundError: com.google.repacked.apache.commons.io.FileUtils"

Android应用在其build.gradle中具有以下内容:dependencies{...compile'commons-io:commons-io:2.4'}构建和安装应用程序没有问题。但是下面的代码:FileUtils.writeStringToFile(fText,"Test");导致以下异常:java.lang.NoClassDefFoundError:com.google.repacked.apache.commons.io.FileUtils谁能提供有关如何解决此问题的提示?[编辑:]我刚刚意识到在build.gradle中没有以下内容仍然可以构建应用程序:depend

android - 为什么 ContentResolver.openFileDescriptor 抛出 IllegalArgumentException?出路?

我有两个问题,这里用一段简短的代码来说明我的问题:ContentResolverresolver=context.getContentResolver();DocumentsContract.deleteDocument(resolver,documentUri);resolver.openFileDescriptor(documentUri,"rw");文档说最后一行“ThrowsFileNotFoundExceptionifnofileexistsundertheURIorthemodeisinvalid.”但实际上我得到了java.lang.IllegalArgumentExce

java - Android 抛出 DeadObjectException : Transaction failed on small parcel; remote process probably died just in HUAWEI Android 8. 0.0

1804-1109:43:24.4822296822968ECrashHandler:Inthread:Thread[main,5,main]1904-1109:43:24.4822296822968ECrashHandler:UncaughtExceptiondetected:java.lang.IllegalStateException:FailurereadingAssistStructuredata:android.os.DeadObjectException:Transactionfailedonsmallparcel;remoteprocessprobablydied200

android - MapView 抛出 IllegalArgumentException - 错误的图像大小 : 192 192

我从SamsungVibrantGalaxyS的用户那里收到过多的崩溃报告。在搜索了此问题的解决方案后,我唯一遇到的是Google代码上的未解决问题:http://code.google.com/p/android/issues/detail?id=4599线程建议扩展MapView并捕获异常。这是最好的方法,还是有更好的方法?我想彻底解决这个问题,而不是用绷带包扎它。这是堆栈跟踪:java.lang.IllegalArgumentException:wrongimagesize:192192atcom.google.googlenav.map.MapTile.getImage(Unk

android - java.lang.NoClassDefFoundError : com. urbanairship.UAirship

我有一台新的Mac(Lion10.7.3)。安装了Eclipse和androidsdk。从SVN检查我的项目,尝试运行并得到这个丑陋的异常:05-2012:17:21.175:E/AndroidRuntime(32499):FATALEXCEPTION:main05-2012:17:21.175:E/AndroidRuntime(32499):java.lang.NoClassDefFoundError:com.urbanairship.UAirship05-2012:17:21.175:E/AndroidRuntime(32499):atcom.neo.ovs3.MyApp.onCr

使用 Robolectric 进行 Android 单元测试会抛出错误 AndroidManifest.xml 未找到或不是文件

我正在尝试使用Robolectric在Eclipse中的应用程序上运行测试用例,如thisblog中所述,但是当我运行JUnit测试时,出现以下错误java.lang.RuntimeException:java.io.FileNotFoundException:C:\Users\abc\workspace\SumTestCases\AndroidManifest.xmlnotfoundornotafile;itshouldpointtoyourproject'sAndroidManifest.xmlatcom.xtremelabs.robolectric.RobolectricTest

android - 执行 Android JUnit 测试时出现 NoClassDefFoundError

首先有类似here这样的问题或here但是我既没有一些外部库,也没有一个lib文件夹,也没有一些包含的jars之类的东西,所以我想知道我在运行AndroidJunit测试时做错了什么。我的项目结构是这样的:如您所见,我有一个单独的项目用于AndroidJUnit测试。测试类如下所示:publicclassPersistenceManager{privatestaticfinalStringFILENAME="kpzwien_storage";publicstaticvoidpersist(Stringdata,Contextcontext)throwsIOException{FileO

java.lang.NoClassDefFoundError : org/apache/http/conn/HttpClientConnectionManager 错误

我在Android应用程序中使用Mashape的API。Mashape推荐使用Unirest库。我已经包含了unirest链接中提到的依赖项:http://unirest.io/java我的依赖项:compilefileTree(dir:'libs',include:['*.jar'])compilegroup:'com.mashape.unirest',name:'unirest-java',version:'1.3.26'compilegroup:'org.apache.httpcomponents',name:'httpcore',version:'4.3.3'compilegr

Android Volley HTTPS header 抛出 400

我的应用程序已经运行了一段时间,一切都非常好!服务器最近从http更新到https,自那次更改以来,我在每次服务器调用时都会收到Error400BADINPUT。经过数小时的痛苦研究后,我发现如果我发送带有空header的请求,则请求通过!没有错误。但我需要那些标题!此外,在iOS和我在POSTMAN中的检查中,header都运行良好,所以我认为问题一定出在客户端。我正在发送我的标题覆盖getHeaders方法。有人遇到过这个问题吗?知道如何解决这个问题吗?我的标题代码:@OverridepublicMapgetHeaders()throwsAuthFailureError{HashM